package com.iyeed.jbpm05.demo03.timer;

import java.util.concurrent.TimeUnit;

import org.jbpm.JbpmConfiguration;
import org.jbpm.JbpmContext;
import org.junit.Test;

public class TimerTest {

	@Test
	public void testTimerProcess() {
		JbpmContext jcontext = JbpmConfiguration.getInstance().createJbpmContext();
		try {
			jcontext.newProcessInstance("timerprocess").signal();
		} finally {
			jcontext.close();
		}
	}
	
	@Test
	public void testStartJob() {
		JbpmConfiguration.getInstance().getJobExecutor().start();
		try {
			TimeUnit.HOURS.sleep(10);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}
}
